package com.ali.springcloud;

import com.ali.springcloud.entities.CommonResult;
import com.ali.springcloud.entities.Payment;
import com.ali.springcloud.service.PaymentFeignService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ：ALi
 * @date ：Created in 2022/7/3 14:47
 * @description：控制层代码
 * @modified By：
 * @version: $
 */
@RestController
public class OrderFeignController {

    @Resource
    private PaymentFeignService paymentFeignService;

    //查询
    @GetMapping(value = "/consumer/payment/get/{id}")
    public CommonResult getById(@PathVariable("id") Long id) {
        CommonResult<Payment> byId = paymentFeignService.getById(id);
        return byId;
    }
}